<extend name="Common/base"/>


<block name="header">
    <div class="header">
        <div class="logo"><img src="__IMG__/logo_03.png"></div>
        <div class="search">
            <div class="search_l" >
                <form id="searchform" action="{:U('Item/index')}" method="get">
                    <div class="form-group">
                        <!--<select class="form-contro2">-->
                            <!--<volist name="districts" id="info">-->
                                <!--<option value="{$info.id}" <if condition="$info['id'] eq I('get.did')">selected="selected"</if>>{$info.title}</option>-->
                            <!--</volist>-->
                            <!--&lt;!&ndash;<option value=""  <if condition="0 eq I('get.did',0)">selected="selected"</if>>全部分类</option>&ndash;&gt;-->
                        <!--</select>-->
                    </div>
                    <div class="form-group">
                        <input type="text" name="key" class="form-control" id="exampleInputEmail1" placeholder="请输入文档名称..." value="{:I('get.key','')}">
                    </div>
                </form>
            </div>
            <div class="search_r"><a href="#"></a></div>
        </div>
    </div>
</block>

<block name="body">
    <div class="sub_title"></div>
    <div class="con">
        <div class="new" style="height: 368px;">
            <div class="title">
                <div class="more"><a href="{:U('Item/index')}" target="_blank">+ MORE</a></div>
                <h3>重要文档</h3>
            </div>
            <div class="new_nr" style="overflow:hidden;">
                <ul id="itemsul">
                    <article:position pos="1" name="info" limit="C('POSITION_INDEX_ROWS')" type="Item">
                        <li><span>{$info.district}</span><a href="{:U('Item/detail',array('id'=>$info['id']))}" target="_blank">{$info.title}</a></li>
                    </article:position>
                </ul>
            </div>
        </div>
    </div>
    <script language="javascript">
        function startmarquee(lh,speed,delay) {
            var p=false;
            var t;
            var o=document.getElementById("itemsul");
            o.innerHTML+=o.innerHTML;
            o.style.marginTop=0;
            o.onmouseover=function(){p=true;};
            o.onmouseout=function(){p=false;};

            function start(){
                t=setInterval(scrolling,speed);
                if(!p) o.style.marginTop=parseInt(o.style.marginTop)-1+"px";
            }

            function scrolling(){
                if(parseInt(o.style.marginTop)%lh!=0){
                    o.style.marginTop=parseInt(o.style.marginTop)-1+"px";
                    if(Math.abs(parseInt(o.style.marginTop))>=o.scrollHeight/2) o.style.marginTop=0;
                }else{
                    clearInterval(t);
                    setTimeout(start,delay);
                }
            }

            setTimeout(start,delay);
        }

        startmarquee(40,20,1500);
        function a(){
            console.log('a');
        }
        function b(){
            a();
        }
        a();
    </script>
</block>